package com.mytest.provider.service.pojo;

import java.util.Objects;

/**
 * @Author: llq
 * @Date: 2020/4/24
 */
public class Car implements Cloneable{

    String a;
    
    String b;

    public Car(String a, String b, int c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    int c;

    public int getC() {
        return c;
    }

    public void setC(int c) {
        this.c = c;
    }

    public Car(String a, String b) {
        this.a = a;
        this.b = b;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Car car = (Car) o;
        return c == car.c &&
                Objects.equals(a, car.a) &&
                Objects.equals(b, car.b);
    }

    @Override
    public int hashCode() {
        return Objects.hash(a, b, c);
    }

    @Override
    public String toString() {
        return "Car{" +
                "a='" + a + '\'' +
                ", b='" + b + '\'' +
                ", c=" + c +
                '}';
    }

    /*@Override
    public Car clone() { //重写clone()方法
        Car o = null;
        try {
            o = (Car)super.clone();
        }catch(CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return o;
    }*/

    public String getA() {
        return a;
    }

    public void setA(String a) {
        this.a = a;
    }

    public String getB() {
        return b;
    }

    public void setB(String b) {
        this.b = b;
    }

    public void setC(ResultCode resultCode) {
        this.c = resultCode.c;
    }
}
